import time
import pyautogui  # pip install opencv-python pyautogui
import sqlite3
import pathlib

root=pathlib.Path(__file__).parent
idpath=str(root/"kh.png")
print(idpath)
r_location = pyautogui.locateOnScreen(idpath, confidence=0.8, grayscale=True)
if(r_location!=None):
    mouse_x=r_location[0]+150
    mouse_y=r_location[1]+12
    pyautogui.moveTo(mouse_x,mouse_y)
    pyautogui.click(mouse_x, mouse_y)
    pyautogui.typewrite("1123321123")
else:
    print("没有找到刷新按钮")